home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / actlib13.zip / STRINGS.ZIP / CASE.C < prev    next >
Text File  |  1993-01-14  |  751b  |  32 lines

  1. /*  Copyright (C) 1993   Marc Stern  (internet: stern@mble.philips.be)  */
  2.  
  3. #include "strings.h"
  4.  
  5. /***
  6.  *  Function    :  strcase
  7.  *
  8.  *  Description :  change case of a string.
  9.  *              All special characters are translated (éèà...)
  10.  *
  11.  *  Parameters  :  in   char      *string  string to translate
  12.  *                 in   casetype  type     UPPER/LOWER
  13.  *                                        
  14.  *  Value       :  type = { UPPER, LOWER }
  15.  *
  16.  *  Decisions   :  If character > 255, no change made.
  17.  *
  18.  *  Return      :  pointer to result
  19.  *
  20.  *  OS/Compiler :  All
  21.  ***/
  22.  
  23. char *strcase( char *string, casetype type )
  24.  
  25. { char *ptr;
  26.  
  27.   for ( ptr = string ; *ptr; ptr++ ) *ptr = chcase( *ptr, type );
  28.  
  29.   return string;
  30. }
  31.  
  32.